package com.boesch.electroOffice.business.businessObjectImpl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.boesch.electroOffice.business.businessObject.ArticleBusinessObject;
import com.boesch.electroOffice.business.common.BusinessException;
import com.boesch.electroOffice.dataaccess.common.IllegalDataAccessException;
import com.boesch.electroOffice.dataaccess.dao.ArticleDao;
import com.boesch.electroOffice.model.electroOffice.Article;
import com.boesch.electroOffice.model.electroOffice.EldasArticle;
import com.boesch.electroOffice.model.messerli.SteigerArticle;

public class ArticleBusinessObjectImpl implements ArticleBusinessObject, Serializable {

	private static final long serialVersionUID = 4546320488633090255L;

	@Autowired
	private ArticleDao articleDao;

	public List<EldasArticle> readAllEldasArticles() throws BusinessException, IllegalDataAccessException {
		return articleDao.readAllEldasArticles();
	}

	public List<SteigerArticle> readAllSteigerArticles() throws BusinessException, IllegalDataAccessException {
		return articleDao.readAllSteigerArticles();
	}

	public List<? extends Article> readArticlesByAppointmentIdAndIdentifierId(int appointmentId, int identifierId) throws BusinessException, IllegalDataAccessException {
		return articleDao.readArticlesByAppointmentIdAndIdentifierId(appointmentId, identifierId);
	}

	public String saveEldasArticle(EldasArticle article) throws BusinessException, IllegalDataAccessException {
		return articleDao.saveEldasArticle(article);

	}

	public String saveSteigerArticle(SteigerArticle article) throws BusinessException, IllegalDataAccessException {
		return articleDao.saveSteigerArticle(article);
	}
}
